home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: jlilley@ix.netcom.com (John Lilley)
- Newsgroups: comp.lang.c++
- Subject: Re: Problem with copy constructor in derived class
- Date: 3 Apr 1996 14:38:46 GMT
- Organization: Netcom
- Message-ID: <4ju2hm$96q@cloner2.ix.netcom.com>
- References: <bforney-0104962228190001@grimmy.reshall.umich.edu>
- NNTP-Posting-Host: den-co11-06.ix.netcom.com
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-NETCOM-Date: Wed Apr 03 6:38:46 AM PST 1996
- X-Newsreader: WinVN 0.99.7
-
- In article <bforney-0104962228190001@grimmy.reshall.umich.edu>,
- bforney@umich.edu says...
- >
- >Hello. I'm trying to create a copy constructor for a derived class. The
- >base class does not have a copy constructor, so this could be a problem.
- >(I'm really not sure.) Can anyone tell me if the base class needs a copy
- >constructor?
- >
- >I started to consider the lack of a copy constructor in the base class a
- >problem when Metrowerks 8's C++ compiler displayed this warning:
- >
- >Error : cannot construct base class 'LArray'
- >UUrl.cp line 27 }
- >
- >Here's the function in which the error occurs:
- >
- >LUrlArray::LUrlArray(const LUrlArray &inArray)
- >{
- > CopyWholeArray(inArray);
- >}
- >
- >The error occurs at the close brace. I'm not sure why this is happening.
-
-
- While terseness in postings is appreciated, I am afraid that I cannot discern
- a solution without some more info? Can you include the declaration for the
- base class and the CopyWholeArray method?
-
- john lilley
-
-
-